﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Common;
using System.Data.OleDb;
using System.Data;
using BobbyCore;

namespace Dao
{
   public class DProcess
    {
       private const string userlogin = @"select loginname,loginpass from login where loginname=@loginname and loginpass=@loginpass";
       public bool UserLogin(string loginname, string loginpass)
       {
           DbParameter[] para =
           {
                   new OleDbParameter("@loginname",OleDbType.LongVarChar,20){Value=loginname}
                  ,new OleDbParameter("@loginpass",OleDbType.LongVarChar,20){Value=loginpass}

                
            };
           return new Operation().ExScalar(CommandType.Text, userlogin, para) != null;
       }
   }
}
